class CreateAds < ActiveRecord::Migration
  def change
    create_table :ads do |t|
      t.string :label
      t.text :description
      t.boolean :ad_type # 0 : possession | 1 : service
      t.integer :cost
      t.string :city
      t.string :wish
      t.boolean :enabled
      t.boolean :is_service
      t.boolean :is_object
      t.integer :board_id # t.references :board
      t.integer :user_id # t.references :user

      t.string :picture_file_name
      t.string :picture_content_type
      t.integer :picture_file_size
      t.datetime :picture_updated_at

      t.timestamps
    end
    #add_index :ads, :board_id, :user_id
  end
end
